package encore.portal.portlet.models;

import java.util.List;
import java.util.Locale;
import java.util.Map;

import javax.xml.namespace.QName;

public interface PortletApplicationDefinition {
	
	public static final String JSR_168_VERSION="1.0";
	
	public static final String JSR_286_VERSION="2.0";
	
	public String getName();
	
	public void setName(String paramName);
	
	public String getContextPath();
	
	public void setContextPath(String contextPath);
	
	/**
	 * PortletDefinition 相关操作
	 * @param portletName
	 * @return
	 */
	public PortletDefinition getPortlet(String portletName);
	public List<? extends PortletDefinition> getPortlets();
	public PortletDefinition addPortlet(String name);
	
	/**
	 EventDefinition 相关操作
	 */
	public List<? extends EventDefinition> getEventDefinitions();
    public EventDefinition addEventDefinition(String name);
    public EventDefinition addEventDefinition(QName name);

    public PublicRenderParameter getPublicRenderParameter(String identifier);
    public List<? extends PublicRenderParameter> getPublicRenderParameters();
    public PublicRenderParameter addPublicRenderParameter(String name,String identifier);
	public PublicRenderParameter addPublicRenderParameter(QName name,String identifier);
	
	public String getVersion();

	public void setVersion();
	
	public CustomPortletMode getCustomPortletMode(String name);
	public List<? extends CustomPortletMode> getCustomPortletModes();
	public CustomPortletMode addCustomPortletMode(String name);
	
	public CustomWindowState getCustomWindowState(String name);
	public List<? extends CustomWindowState> getCustomWindowStates();
	public CustomWindowState addCustomWindowState(String name);
	
	public UserAttribute getUserAttribute(String name);
	public List<? extends UserAttribute> getAttributes();
	public UserAttribute addUserAttribute(String name);
	
	public List<? extends SecurityConstraint> getSecurityConstraints();
	public SecurityConstraint addSecurityConstraint(String transportGuarantee);

	public String getResourceBundle();
	public void setResourceBundle(String resourceBundle);
	
	public Filter getFilter(String filterName);
	public List<? extends  Filter> getFilters();
	public Filter addFilter(String filterName);
	
	public FilterMapping getFilterMapping(String filterName);
	public List<? extends FilterMapping> getFilterMappings();
	public FilterMapping addFilterMapping(String filterName);
	
	public List<? extends Listener> getListeners();
	public Listener addListener(String listenerClass);
	
	public String getDefaultNamespace();
	public void setDefaultNamespace();
	
	public ContainerRuntimeOption getContainerRuntimeOption(String name);
    public List<? extends ContainerRuntimeOption> getContainerRuntimeOptions();
    public ContainerRuntimeOption addContainerRuntimeOption(String name);
    
    public Map<Locale, String> getLocaleEncodingMappings();
    public void addLocaleEncodingMapping(Locale locale,String encoding);
	
}
